#ifndef CMD_USER
#define CMD_USER

#include <string>
#include <iostream>
#include <cstdlib>
#include <list>
#include "../../sqlite3/sqlite3.h"
#include "../../persistence.h"
#include "../../domain.h"
#include "../../interaction.h"
#include "user.h"

using namespace std;
/**SERVE A CONTROLADORA DE USUARIOS RECEBENDO UM OBJETO E MONTANDO  AS QUERYS
*/
class cmd_user : public Commando
{
    private:
        User * user;
        int cmd;
        Interaction * interaction;
        User * userLogged;

    public:
        cmd_user();
        cmd_user(User *);
        string query();

        void setUser(User *);
        User * getUser();

        void setCmd(int);
        static const int ALTERARNOME = 0;
        static const int ALTERARENDERECO = 1;
        static const int ALTERARSENHA = 2;
        static const int APAGARUSUARIO = 3;
};

/**SERVE A CONTROLADORA DE AUTENTICACAO RECEBENDO UM OBJETO E MONTANDO  AS QUERYS
*/
class cmd_auth : public Commando
{
    private:
        User * user;
        int cmd;

    public:
        cmd_auth();
        cmd_auth(User *);
        string query();

        void setUser(User *);
        User * getUser();

        void setCmd(int);
        static const int FAZERLOGIN = 0;
        static const int CADASTRAR = 1;
};

#endif // CMD_USER
